package cn.iocoder.yudao.module.erp.controller.admin.warningrules.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.erp.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - ERP 预警规则 Response VO")
@Data
@ExcelIgnoreUnannotated
public class WarningRulesRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18605")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3958")
    @ExcelProperty("部门id")
    private String deptId;

    @Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "24861")
    @ExcelProperty("产品编码")
    private Long productId;

    @Schema(description = "分类编码", example = "21749")
    @ExcelProperty("分类编码")
    private Long categoryId;

    @Schema(description = "分类名称", example = "张三")
    @ExcelProperty("分类名称")
    private String categoryName;

    @Schema(description = "单位编码", example = "3113")
    @ExcelProperty("单位编码")
    private Integer unitId;

    @Schema(description = "单位名称", example = "李四")
    @ExcelProperty("单位名称")
    private String unitName;

    @Schema(description = "规格")
    @ExcelProperty("规格")
    private String standard;

    @Schema(description = "数值类型（0整数1百分比）", example = "0")
    @ExcelProperty(value = "数值类型（0整数1百分比）", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.NUM_VALUE_TYPE)
    private Integer maxValueType;

    @Schema(description = "上限值")
    @ExcelProperty("上限值")
    private BigDecimal maxValue;

    @Schema(description = "下限值")
    @ExcelProperty("下限值")
    private BigDecimal minValue;

    @Schema(description = "数值类型（0整数1百分比）", example = "0")
    @ExcelProperty(value = "数值类型（0整数1百分比）", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.NUM_VALUE_TYPE)
    private Integer minValueType;

    @Schema(description = "效期预警值（天数）")
    @ExcelProperty("效期预警值（天数）")
    private Integer expirydateValue;

    @Schema(description = "滞留预警值（天数）")
    @ExcelProperty("滞留预警值（天数）")
    private Integer detainValue;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}